<template>
  <div class="header">
    <div class="header-left">
      <div class="iconfont back-icon">&#xe624;</div>
    </div>
    <div class="header-input">
      <span class="iconfont">&#xe632;</span>
      输入城市/景点/游戏主题
    </div>
    <router-link to="/city">
      <div class="header-right">
        {{this.city}}
        <span class="iconfont arrow-icon">&#xe62b;</span>
      </div>
    </router-link>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/varibles.styl'
  .header
    display flex
    line-height $headerHeight
    background $bgColor
    color #fff
    .header-left
      width 2.64rem
      float left
      .back-icon
        font-size 1.0rem
        text-align center
    .header-input
      flex:1
      height 1.94rem
      line-height 1.94rem
      margin-top .22rem
      padding-left .4rem
      background #fff
      font-size .9rem
      color #ccc
      border-radius .1rem
    .header-right
      min-width 4.24rem
      padding 0 .1rem
      float right
      color #fff
      text-align center
      .arrow-icon
        font-size .82rem
        margin-left -.3rem
</style>
